#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDockWidget>


MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QDockWidget* dock = new QDockWidget("浮动窗口",this);
    addDockWidget(Qt::BottomDockWidgetArea,dock);

    //设置允许停放的位置
    dock->setAllowedAreas(Qt::TopDockWidgetArea | Qt::LeftDockWidgetArea);
}

MainWindow::~MainWindow()
{
    delete ui;
}

